package tech.aistar.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tech.aistar.entity.EnvironmentFaclity;
import tech.aistar.entity.Evaluate;

import java.util.List;

public interface EvaluateMapper {
    @Select("select * from evaluate")
    List<Evaluate> selectAll();

    @Insert("insert into evaluate values(agentId,grade,tenantId,landlordId)")
    void insert(Evaluate evaluate);
    @Update("update evaluate set agent_id=#{agentId},grade=${grade},tenant_id=#{tenantId},landlord_id=#{landlordId} where id=#{Id}")
    void  updateByPrimaryKey(Evaluate evaluate);

    @Delete("delete from evaluate where id=#{Id}")
    void deleteByPrimaryKey(Integer id);


    @Select("select * from evaluate where id=#{Id}")
    Evaluate findById(Integer integer);


    @Select("select * from evaluate where agent_id=#{agentId}")
    Evaluate findByagentId(Integer integer);
}
